import Vue from 'vue'
import Router from 'vue-router'
// import { VueRouter } from 'vue-router/types/router';
import Home from '@/components/tabbar/HomeContainer'
import Member from '@/components/tabbar/MemberContainer'
import Shopcar from '@/components/tabbar/ShopcarContainer'
import Search from '@/components/tabbar/SearchContainer'

import Newslist from '@/components/news/NewsList'
import NewsInfo from '@/components/news/NewsInfo'
import PhotoList from '@/components/photos/PhotoList'
import PhotoInfo from '@/components/photos/PhotoInfo'
import GoodsList from '@/components/Goods/GoodsList'
import GoodsInfo from '@/components/Goods/GoodsInfo'



Vue.use(Router)

export default new Router({
  routes: [
    // 首页
    {path: '/', redirect: '/home'},
    {path: '/home', name: 'home',component: Home},
     // 会员
    {path:'/member',name:'member',component:Member},
    // 购物车
    {path:'/shopcar',name:'shopcar',component:Shopcar},   
    // 搜索
    {path:'/search',name:'search',component:Search},
    //新闻列表
    {path:'/home/newslist',name:'newslist',component:Newslist},
    //新闻详情
    {path:'/home/newsinfo/:id',name:'newsinfo',component:NewsInfo},
    // photos
    {path:'/home/photolist',name:'photolist',component:PhotoList},
    // Photoinfo
    {path:'/home/photoinfo/:id',name:'photoinfo',component:PhotoInfo},
    //商品列表
    {path:'/home/goodslist',name:'goodslist',component:GoodsList},
    //商品详情    
    {path:'/home/goodsinfo/:id',name:'goodsinfo',component:GoodsInfo},
    
    // {path:'/home/newsinfo/comment',name:'comment',component:Comment},
    // //  角色添加
    // {path:'/addRole',name:'addRole',component:addRole},
    // //  角色修改
    // {path:'/amendRole',name:'amendRole',component:amendRole},
    // //  给分配权限
    // {path:'/allotPower',name:'allotPower',component:allotPower},
    // // 职位管理
    // {path:'/duty',name:'duty',component:duty},
    // // 添加职位
    // {path:'/addDuty',name:'addDuty',component:addDuty},
    // // 修改职位
    // {path:'/amendDuty',name:'amendDuty',component:amendDuty},
    // // 职位分配角色
    // {path:'/allotRoles',name:'allotRoles',component:allotRoles},
    // // 机构管理
    //  {path:'/organization',name:'organization',component:organization},
    // //  权限列表
    // {path:'/legalList',name:'legalList',component:legalList},
    // // 管理员管理
    // {path:'/admin',name:'admin',component:admin},
    // // 查看日志
    // {path:'/log',name:'log',component:log},
    // // 编辑组织
    // {path:'/redactOrganization',name:'redactOrganization',component:redactOrganization},
    // // 添加组织机构
    // {path:'/addOrganization',name:'addOrganization',component:addOrganization},
    // // 分配职位
    // {path:'/allotPosition',name:'allotPosition',component:allotPosition}
    
    
  ],
  linkActiveClass:'mui-active'
})
